Optimal. Leaf size=194 \[ \frac {2 (7 A-i B) \tan ^2(c+d x) \sqrt {a+i a \tan (c+d x)}}{35 d}-\frac {2 (7 A-31 i B) (a+i a \tan (c+d x))^{3/2}}{105 a d}-\frac {8 (7 A-i B) \sqrt {a+i a \tan (c+d x)}}{35 d}+\frac {\sqrt {2} \sqrt {a} (A-i B) \tanh ^{-1}\left (\frac {\sqrt {a+i a \tan (c+d x)}}{\sqrt {2} \sqrt {a}}\right )}{d}+\frac {2 B \tan ^3(c+d x) \sqrt {a+i a \tan (c+d x)}}{7 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.52, antiderivative size = 194, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 5, integrand size = 36, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.139, Rules used = {3597, 3592, 3527, 3480, 206} \[ \frac {2 (7 A-i B) \tan ^2(c+d x) \sqrt {a+i a \tan (c+d x)}}{35 d}-\frac {2 (7 A-31 i B) (a+i a \tan (c+d x))^{3/2}}{105 a d}-\frac {8 (7 A-i B) \sqrt {a+i a \tan (c+d x)}}{35 d}+\frac {\sqrt {2} \sqrt {a} (A-i B) \tanh ^{-1}\left (\frac {\sqrt {a+i a \tan (c+d x)}}{\sqrt {2} \sqrt {a}}\right )}{d}+\frac {2 B \tan ^3(c+d x) \sqrt {a+i a \tan (c+d x)}}{7 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 206
Rule 3480
Rule 3527
Rule 3592
Rule 3597
Rubi steps
\begin {align*} \int \tan ^3(c+d x) \sqrt {a+i a \tan (c+d x)} (A+B \tan (c+d x)) \, dx &=\frac {2 B \tan ^3(c+d x) \sqrt {a+i a \tan (c+d x)}}{7 d}+\frac {2 \int \tan ^2(c+d x) \sqrt {a+i a \tan (c+d x)} \left (-3 a B+\frac {1}{2} a (7 A-i B) \tan (c+d x)\right ) \, dx}{7 a}\\ &=\frac {2 (7 A-i B) \tan ^2(c+d x) \sqrt {a+i a \tan (c+d x)}}{35 d}+\frac {2 B \tan ^3(c+d x) \sqrt {a+i a \tan (c+d x)}}{7 d}+\frac {4 \int \tan (c+d x) \sqrt {a+i a \tan (c+d x)} \left (-a^2 (7 A-i B)-\frac {1}{4} a^2 (7 i A+31 B) \tan (c+d x)\right ) \, dx}{35 a^2}\\ &=\frac {2 (7 A-i B) \tan ^2(c+d x) \sqrt {a+i a \tan (c+d x)}}{35 d}+\frac {2 B \tan ^3(c+d x) \sqrt {a+i a \tan (c+d x)}}{7 d}-\frac {2 (7 A-31 i B) (a+i a \tan (c+d x))^{3/2}}{105 a d}+\frac {4 \int \sqrt {a+i a \tan (c+d x)} \left (\frac {1}{4} a^2 (7 i A+31 B)-a^2 (7 A-i B) \tan (c+d x)\right ) \, dx}{35 a^2}\\ &=-\frac {8 (7 A-i B) \sqrt {a+i a \tan (c+d x)}}{35 d}+\frac {2 (7 A-i B) \tan ^2(c+d x) \sqrt {a+i a \tan (c+d x)}}{35 d}+\frac {2 B \tan ^3(c+d x) \sqrt {a+i a \tan (c+d x)}}{7 d}-\frac {2 (7 A-31 i B) (a+i a \tan (c+d x))^{3/2}}{105 a d}+(i A+B) \int \sqrt {a+i a \tan (c+d x)} \, dx\\ &=-\frac {8 (7 A-i B) \sqrt {a+i a \tan (c+d x)}}{35 d}+\frac {2 (7 A-i B) \tan ^2(c+d x) \sqrt {a+i a \tan (c+d x)}}{35 d}+\frac {2 B \tan ^3(c+d x) \sqrt {a+i a \tan (c+d x)}}{7 d}-\frac {2 (7 A-31 i B) (a+i a \tan (c+d x))^{3/2}}{105 a d}+\frac {(2 a (A-i B)) \operatorname {Subst}\left (\int \frac {1}{2 a-x^2} \, dx,x,\sqrt {a+i a \tan (c+d x)}\right )}{d}\\ &=\frac {\sqrt {2} \sqrt {a} (A-i B) \tanh ^{-1}\left (\frac {\sqrt {a+i a \tan (c+d x)}}{\sqrt {2} \sqrt {a}}\right )}{d}-\frac {8 (7 A-i B) \sqrt {a+i a \tan (c+d x)}}{35 d}+\frac {2 (7 A-i B) \tan ^2(c+d x) \sqrt {a+i a \tan (c+d x)}}{35 d}+\frac {2 B \tan ^3(c+d x) \sqrt {a+i a \tan (c+d x)}}{7 d}-\frac {2 (7 A-31 i B) (a+i a \tan (c+d x))^{3/2}}{105 a d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 3.57, size = 201, normalized size = 1.04 \[ \frac {\sqrt {a+i a \tan (c+d x)} (A+B \tan (c+d x)) \left (\frac {\sqrt {2} (A-i B) \sinh ^{-1}\left (e^{i (c+d x)}\right )}{\sqrt {\frac {e^{i (c+d x)}}{1+e^{2 i (c+d x)}}} \sqrt {1+e^{2 i (c+d x)}}}+\frac {2}{105} \sqrt {\sec (c+d x)} \left ((-46 B-7 i A) \tan (c+d x)+3 \sec ^2(c+d x) (7 A+5 B \tan (c+d x)-i B)-112 A+46 i B\right )\right )}{d \sec ^{\frac {3}{2}}(c+d x) (A \cos (c+d x)+B \sin (c+d x))} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.53, size = 444, normalized size = 2.29 \[ \frac {105 \, {\left (d e^{\left (6 i \, d x + 6 i \, c\right )} + 3 \, d e^{\left (4 i \, d x + 4 i \, c\right )} + 3 \, d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )} \sqrt {\frac {{\left (8 \, A^{2} - 16 i \, A B - 8 \, B^{2}\right )} a}{d^{2}}} \log \left (\frac {{\left ({\left (4 i \, A + 4 \, B\right )} a e^{\left (i \, d x + i \, c\right )} + \sqrt {2} {\left (i \, d e^{\left (2 i \, d x + 2 i \, c\right )} + i \, d\right )} \sqrt {\frac {{\left (8 \, A^{2} - 16 i \, A B - 8 \, B^{2}\right )} a}{d^{2}}} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}}\right )} e^{\left (-i \, d x - i \, c\right )}}{i \, A + B}\right ) - 105 \, {\left (d e^{\left (6 i \, d x + 6 i \, c\right )} + 3 \, d e^{\left (4 i \, d x + 4 i \, c\right )} + 3 \, d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )} \sqrt {\frac {{\left (8 \, A^{2} - 16 i \, A B - 8 \, B^{2}\right )} a}{d^{2}}} \log \left (\frac {{\left ({\left (4 i \, A + 4 \, B\right )} a e^{\left (i \, d x + i \, c\right )} + \sqrt {2} {\left (-i \, d e^{\left (2 i \, d x + 2 i \, c\right )} - i \, d\right )} \sqrt {\frac {{\left (8 \, A^{2} - 16 i \, A B - 8 \, B^{2}\right )} a}{d^{2}}} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}}\right )} e^{\left (-i \, d x - i \, c\right )}}{i \, A + B}\right ) - 8 \, \sqrt {2} {\left ({\left (119 \, A - 92 i \, B\right )} e^{\left (7 i \, d x + 7 i \, c\right )} + 7 \, {\left (37 \, A - 16 i \, B\right )} e^{\left (5 i \, d x + 5 i \, c\right )} + 35 \, {\left (7 \, A - 4 i \, B\right )} e^{\left (3 i \, d x + 3 i \, c\right )} + 105 \, A e^{\left (i \, d x + i \, c\right )}\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}}}{420 \, {\left (d e^{\left (6 i \, d x + 6 i \, c\right )} + 3 \, d e^{\left (4 i \, d x + 4 i \, c\right )} + 3 \, d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.34, size = 162, normalized size = 0.84 \[ -\frac {2 \left (-\frac {i B \left (a +i a \tan \left (d x +c \right )\right )^{\frac {7}{2}}}{7}+\frac {2 i B \left (a +i a \tan \left (d x +c \right )\right )^{\frac {5}{2}} a}{5}+\frac {A \left (a +i a \tan \left (d x +c \right )\right )^{\frac {5}{2}} a}{5}-\frac {2 i B \left (a +i a \tan \left (d x +c \right )\right )^{\frac {3}{2}} a^{2}}{3}-\frac {A \left (a +i a \tan \left (d x +c \right )\right )^{\frac {3}{2}} a^{2}}{3}+A \,a^{3} \sqrt {a +i a \tan \left (d x +c \right )}-\frac {a^{\frac {7}{2}} \left (-i B +A \right ) \sqrt {2}\, \arctanh \left (\frac {\sqrt {a +i a \tan \left (d x +c \right )}\, \sqrt {2}}{2 \sqrt {a}}\right )}{2}\right )}{d \,a^{3}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.74, size = 153, normalized size = 0.79 \[ -\frac {105 \, \sqrt {2} {\left (A - i \, B\right )} a^{\frac {9}{2}} \log \left (-\frac {\sqrt {2} \sqrt {a} - \sqrt {i \, a \tan \left (d x + c\right ) + a}}{\sqrt {2} \sqrt {a} + \sqrt {i \, a \tan \left (d x + c\right ) + a}}\right ) - 60 i \, {\left (i \, a \tan \left (d x + c\right ) + a\right )}^{\frac {7}{2}} B a + 84 \, {\left (i \, a \tan \left (d x + c\right ) + a\right )}^{\frac {5}{2}} {\left (A + 2 i \, B\right )} a^{2} - 140 \, {\left (i \, a \tan \left (d x + c\right ) + a\right )}^{\frac {3}{2}} {\left (A + 2 i \, B\right )} a^{3} + 420 \, \sqrt {i \, a \tan \left (d x + c\right ) + a} A a^{4}}{210 \, a^{4} d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 1.27, size = 216, normalized size = 1.11 \[ -\frac {2\,A\,\sqrt {a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}}}{d}+\frac {2\,A\,{\left (a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}\right )}^{3/2}}{3\,a\,d}-\frac {2\,A\,{\left (a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}\right )}^{5/2}}{5\,a^2\,d}+\frac {B\,{\left (a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}\right )}^{3/2}\,4{}\mathrm {i}}{3\,a\,d}-\frac {B\,{\left (a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}\right )}^{5/2}\,4{}\mathrm {i}}{5\,a^2\,d}+\frac {B\,{\left (a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}\right )}^{7/2}\,2{}\mathrm {i}}{7\,a^3\,d}-\frac {\sqrt {2}\,B\,\sqrt {-a}\,\mathrm {atan}\left (\frac {\sqrt {2}\,\sqrt {a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}}}{2\,\sqrt {-a}}\right )\,1{}\mathrm {i}}{d}-\frac {\sqrt {2}\,A\,\sqrt {a}\,\mathrm {atan}\left (\frac {\sqrt {2}\,\sqrt {a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}}\,1{}\mathrm {i}}{2\,\sqrt {a}}\right )\,1{}\mathrm {i}}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \sqrt {i a \left (\tan {\left (c + d x \right )} - i\right )} \left (A + B \tan {\left (c + d x \right )}\right ) \tan ^{3}{\left (c + d x \right )}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________